﻿<!--
Project: TrackingCam (http://TrackingCam.codeplex.com)
File: MainWindow.xaml
Version: 20151210
-->

<Window
  x:Class="TrackingCam.MainWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:float="clr-namespace:SilverFlow.Controls;assembly=SilverFlow.Controls"
  xmlns:properties="clr-namespace:TrackingCam.Properties"
  mc:Ignorable="d"

  Width="525" Height="350"
  WindowStartupLocation="CenterScreen"
  WindowState="Maximized"

  Title="TrackingCam v1.0"

  Loaded="Window_Loaded"
  Closing="Window_Closing"
  >

  <Window.Resources>
    <!-- Host Background -->
    <LinearGradientBrush x:Key="HostBackground" StartPoint="0.5,0" EndPoint="0.5,1">
      <GradientStop Color="#FF00AEEF" Offset="0" />
      <GradientStop Color="#FF89E0FF" Offset="1" />
    </LinearGradientBrush>

    <Style TargetType="Label">
      <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <properties:Settings x:Key="settings" />
  </Window.Resources>

  <Grid x:Name="layout" DataContext="{StaticResource settings}">

    <float:FloatingWindowHost
        x:Name="host"
        SnapinEnabled="True"
        SnapinDistance="10"
        SnapinMargin="5"
        ShowMinimizedOnlyInIconbar="True"
        Background="{StaticResource HostBackground}"
        >
      <float:FloatingWindowHost.Bar>
        <StackPanel
          Orientation="Horizontal"
          >

          <Label Content="Tracking Presenter" Target="{Binding ElementName=cbTrackingPresenter}" />
          <CheckBox
            x:Name="cbTrackingPresenter"
            VerticalAlignment="Center"
            IsChecked="{Binding Path=Default.TrackingPresenter, Mode=TwoWay}"
            />

          <Label Content="Tracker:" Target="{Binding ElementName=comboTracker}" />
          <ComboBox
            x:Name="comboTracker"
            SelectedValue="{Binding Path=Default.Tracker, Mode=TwoWay}"
            SelectedValuePath="Tag"
            >
            <ComboBoxItem Tag="KinectDepth">Kinect Depth</ComboBoxItem>
            <ComboBoxItem Tag="KinectAudio">Kinect Audio</ComboBoxItem>
            <ComboBoxItem Tag="Ubisense">Ubisense</ComboBoxItem>
          </ComboBox>

          <TextBlock Text=" - Hellenic Open University, Zoomicon" />

        </StackPanel>
      </float:FloatingWindowHost.Bar>
    </float:FloatingWindowHost>

  </Grid>

</Window>
